#ifndef __STDAFX_H__
#define __STDAFX_H__

#include <htc.h>
#define _XTAL_FREQ 4000000
#include <afx.h>
#include "TypeDefine.h"

// #define SimI2C_CLK_IO TRISB4
// #define SimI2C_DATA_IO TRISB0
// #define SimI2C_CLK_W RB4
// #define SimI2C_DATA_W RB0
// #define SimI2C_DATA_R RB0
#define SimI2C_CLK_IO TRISC5
#define SimI2C_DATA_IO TRISC4
#define SimI2C_CLK_W RC5
#define SimI2C_DATA_W RC4
#define SimI2C_DATA_R RC4
#include "SimI2C.h"
#define SHT25_SimI2C
#include "SHT25.h"


// #define AD421_CLK_W RB5
// #define AD421_DATA_W RC3
// 
// #define AD421_CLK_IO TRISB5
// #define AD421_DATA_IO TRISC3
// 
// #define AD421_CST_W RC0
// #define AD421_CSH_W RA2
// 
// #define AD421_CST_IO TRISC0
// #define AD421_CSH_IO TRISA2
#define AD421_T_CLK_W RB4
#define AD421_T_DATA_W RB5

#define AD421_T_CLK_IO TRISB4
#define AD421_T_DATA_IO TRISB5

#define AD421_CST_W RC2
#define AD421_CST_IO TRISC2



#define AD421_H_CLK_W RC0
#define AD421_H_DATA_W RC1

#define AD421_H_CLK_IO TRISC0
#define AD421_H_DATA_IO TRISC1

#define AD421_CSH_W RA2
#define AD421_CSH_IO TRISA2

#define T1_100ms 53036

unsigned int MeasTick;
unsigned int SystemTick;
unsigned int OutT;
unsigned int OutRH;
void InitSystem( void );
#endif
